	<?php get_header();?>
  <div id="main">								
		<div id="maintext">
		<?php if (have_posts()) : ?>

 	  <?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
 	  <?php /* If this is a category archive */ if (is_category()) { ?>
		<h2><?php echo __('Archive for the ','centita');?>&#8216;<?php single_cat_title(); ?>&#8217; Category</h2>
 	  <?php /* If this is a tag archive */ } elseif( is_tag() ) { ?>
		<h2><?php echo __('Posts Tagged ','centita');?>&#8216;<?php single_tag_title(); ?>&#8217;</h2>
 	  <?php /* If this is a daily archive */ } elseif (is_day()) { ?>
		<h2><?php echo __('Archive for ','centita');?><?php the_time('F jS, Y'); ?></h2>
 	  <?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
		<h2><?php echo __('Archive for ','centita');?><?php the_time('F, Y'); ?></h2>
 	  <?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
		<h2><?php echo __('Archive for ','centita');?><?php the_time('Y'); ?></h2>
	  <?php /* If this is an author archive */ } elseif (is_author()) { ?>
		<h2><?php echo __('Author Archive','centita');?></h2>
 	  <?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
		<h2><?php echo __('Blog Archives','centita');?></h2>
 	  <?php } ?>
    
      <?php $blogtext = (get_option('centita_blogtext')) ? get_option('centita_blogtext') : 75;?>
      <?php while ( have_posts() ) : the_post();?>
        <div class="blog-post">                                    
          <h2><a href="<?php the_permalink();?>"><?php the_title();?></a></h2>
          <div class="blog-posted">
     		    <span class="posted-detail"><?php the_time('F d, Y');?>&nbsp; | &nbsp; <?php the_category(',');?> &nbsp; | &nbsp; <?php the_author_posts_link();?>&nbsp; | &nbsp; <?php comments_popup_link(__('0 Comment','centita'),__('1 Comment','centita'),__('% Comments','centita'));?></span>                                        
          </div>
          <?php if (function_exists('has_post_thumbnail') && has_post_thumbnail()) {?>			
          <img src="<?php echo get_template_directory_uri();?>/timthumb.php?src=<?php echo thumb_url();?>&amp;h=150&amp;w=200&amp;zc=1" alt="" class="imgleft" />
          <?php } ?>
            <p><?php echo excerpt($blogtext);?></p>
          	<span class="read-more"><a href="<?php the_permalink();?>"><img src="<?php echo get_template_directory_uri();?>/images/read-more.gif" alt="" /></a></span>
            <div class="clr"></div>                     
        </div><!-- end of post -->
        <?php endwhile;?>
				<?php 
				  if (function_exists('wp_pagenavi')) :
				    wp_pagenavi();
				  else : 
				?>
      		<div class="navigation">
      			<div class="alignleft"><?php next_posts_link(__('&laquo; Previous Entries','centita')) ?></div>
      			<div class="alignright"><?php previous_posts_link(__('Next Entries &raquo;','centita')) ?></div>
      			<div class="clear"></div>
      		</div>
        <?php endif;?>
        <?php endif;?>        		    
       </div><!-- end of maintext -->
		</div><!-- end of main -->
		<?php get_sidebar();?>
		<?php get_footer();?>